package cn.iocoder.yudao.module.erp.controller.admin.deppurchase.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.erp.dal.dataobject.deppurchaseitem.DepPurchaseItemDO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - ERP 科室采购申请单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DepPurchaseRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11045")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "31664")
    @ExcelProperty("仓库编号")
    private Long warehouseId;

    @Schema(description = "部门id", example = "289")
    @ExcelProperty("部门id")
    private String deptId;

    @Schema(description = "部门名称", example = "289")
    @ExcelProperty("部门名称")
    private String deptName;

    @Schema(description = "科室采购单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4441")
    @ExcelProperty("科室采购单编号")
    private String orderId;

    @Schema(description = "整合单编号", example = "5479")
    @ExcelProperty("整合单编号")
    private String integrateId;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    @DictFormat("purchase_apply_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "流程实例的编号", example = "347")
    @ExcelProperty("流程实例的编号")
    private String processInstanceId;

    @Schema(description = "创建者")
    @ExcelProperty("创建者")
    private String creator;

    @Schema(description = "创建者")
    @ExcelProperty("创建者")
    private String creatorName;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;


    @Schema(description = "科室采购申请项列表")
    private List<DepPurchaseItemDO> depPurchaseItems;

}